package com.wanczy.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wanczy.mapper.UserMapper;
import com.wanczy.pojo.Goods;
import com.wanczy.pojo.User;
import com.wanczy.service.UserService;

@Service
public class UserServiceImpl implements UserService {
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<Goods> findByType(String goodsType) {
		List<Goods> lsit = userMapper.findByType(goodsType);
		return lsit;
	}

	@Override
	public List<Goods> findByNameLike(String goodsName, String shopName, String goodsAddress, String goodsTaste) {
		List<Goods> lsit = userMapper.findByNameLike("%"+goodsName+"%", shopName, goodsAddress, goodsTaste);
		return lsit;
	}

	@Override
	public User findUser(String userTel, String userPass) {
		User user = userMapper.findUser(userTel, userPass);
		return user;
	}

	@Override
	public boolean doInsUser(String userTel, String userPass) {
		boolean flag = userMapper.doInsUser(userTel, userPass);
		return flag;
	}

}
